﻿using Microsoft.Extensions.DependencyInjection;

namespace Microsoft.AspNetCore.Mvc
{
    public static class ControllerExtension
    {
        public static T GetService<T>(this Controller @this)
            => @this.HttpContext.RequestServices.GetService<T>();
    }
}
